package com;
import java.io.*;
public class InputStream {
    public static void main(String[] args) throws Exception {
        File file = new File("D:" + File.separator + "baidu" + File.separator + "www.baidu.txt");
        if (file.exists()) {
           try (FileInputStream input = new FileInputStream(file)){
               byte data[] = new byte[1024];
               int len = input.read(data);
               System.out.println("读取到的数据内容【" + new String(data, 0, len) + "】");
           } catch (Exception e) {}
        }
    }
}
